<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>增加供应商</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
      <el-input v-model.trim="form.Enterprise_Info_SerialNumber" v-show="false"></el-input>
      <el-input v-model.trim="form.Industry_SubCategory_SerialNumber" v-show="false"></el-input>
      <el-input v-model.trim="form.Industry_Category_SerialNumber" v-show="false"></el-input>

      <div class="table_titel">
        <div class="titel">供应商</div>
      </div>
      <el-descriptions :column="3" border size="small">
        <el-descriptions-item label="供应商名称">
          <el-form-item prop="Supplier_Name">
            <el-input v-model.trim="form.Supplier_Name" placeholder="请输入供应商名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="纳税识别号">
          <el-form-item prop="Tax_Number">
            <el-input v-model.trim="form.Tax_Number" placeholder="请输入纳税识别号"></el-input>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item label="供应商地址">
          <el-form-item>
            <div class="linkage">
              <div>
                <el-select v-model="selectProvince" filterable size="small" @change="selectProvinceFun($event)"
                  placeholder="请选择省份">
                  <el-option value="" label="请选择省份"></el-option>
                  <el-option :value="item" :label="item.label" v-for="(item, index) in city" :key="index"></el-option>
                </el-select>
              </div>
              <div>
                <el-select v-model="selectCity" filterable size="small" @change="selectCityFun($event)"
                  placeholder="请选择城市">
                  <el-option value="" label="请选择城市"></el-option>
                  <el-option :value="item" :label="item.label" v-for="(item, index) in cityList"
                    :key="index"></el-option>
                </el-select>
              </div>
              <div>
                <el-select v-model="selectArea" filterable size="small" @change="selectAreaFun($event)"
                  placeholder="请选择区县">
                  <el-option value="" label="请选择区县"></el-option>
                  <el-option :value="item" :label="item.label" v-for="(item, index) in areaList"
                    :key="index"></el-option>
                </el-select>
              </div>
            </div>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="详细地址">
          <el-form-item prop="address">
            <el-input @change="selectAddress($event)" :disabled="isdisabled" v-model.trim="address"
              placeholder="请输入详细地址"></el-input>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>

      <div class="table_titel">
        <div class="titel">供应商经验品牌</div>
        <div class="operation">
          <el-button type="primary" size="small" @click="add_supplier_brand">新增</el-button>
          <el-button type="danger" size="small" @click="remove_supplier_brand">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="1" border size="small" v-for="(item,index) in form.Children.supplier_brand"
        :key="item.key">
        <el-descriptions-item label="品牌流水号">
          <el-form-item>
            <el-select v-model.trim="item.Brand_SerialNumber" filterable  placeholder="请选择商品品牌" filterable style="width: 100%">
              <el-option v-for="(item,index) in brand" :key="index" :label="item.Brand_Name"
                :value="item.Brand_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>

      <div class="table_titel">
        <div class="titel">供应商可供商品</div>
        <div class="operation">
          <el-button type="primary" size="small" @click="add_supplier_article">新增</el-button>
          <el-button type="danger" size="small" @click="remove_supplier_article">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="1" border size="small" v-for="(item,index) in form.Children.supplier_article"
        :key="item.key">
        <el-descriptions-item label="可供商品流水号">
          <el-form-item>
            <el-select v-model.trim="item.Article_SerialNumber" filterable  placeholder="请选择商品" style="width: 100%">
              <el-option v-for="(item,index) in article" :key="index" :label="item.Article_Name"
                :value="item.Article_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>

      <div class="table_titel">
        <div class="titel">供应商银行账户</div>
        <div class="operation">
          <el-button type="primary" size="small" @click="add_supplier_bank_account">新增</el-button>
          <el-button type="danger" size="small" @click="remove_supplier_bank_account">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="3" border size="small" v-for="(item,index) in form.Children.supplier_bank_account"
        :key="item.key">
        <el-descriptions-item label="供应商开户银行">
          <el-form-item :rules="Bank_Name" :prop="'Children.supplier_bank_account.' + index + '.Bank_Name'">
            <el-input v-model.trim="item.Bank_Name" placeholder="供应商开户银行"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="账号">
          <el-form-item :rules="Account_Number" :prop="'Children.supplier_bank_account.' + index + '.Account_Number'">
            <el-input v-model.trim="item.Account_Number" placeholder="供应商银行账户"></el-input>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <div class="table_titel">
        <div class="titel">图片上传</div>
      </div>
      <el-form-item prop="pic">
        <div class="preview" v-show="item.Picture_Url" v-for="(item, index) in fileList" :key="index">
          <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
            :src="DomainIMG+item.Picture_Url" fit="contain"></el-image>
          <span class="el-upload-list__item-actions">
            <span @click="handlePictureCardPreview(DomainIMG+item.Picture_Url)"><i class="el-icon-zoom-in"></i></span>
            <span @click="handleRemove(item.Picture_Order)"><i class="el-icon-delete"></i></span>
          </span>
        </div>
        <el-upload v-show="fileList.length < 1" class="upload-demo" :show-file-list="false" list-type="picture-card"
          action="" accept="image/*" :before-upload="upload">
          <i slot="default" class="el-icon-plus"></i>
        </el-upload>
      </el-form-item>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')" :disabled="disabled">提交</el-button>
      </el-form-item>
    </el-form>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="">
    </el-dialog>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>
  <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>